'\" te
.\"  Copyright (c) 1990, 1995 by Mortice Kern Systems Inc.  All Rights Reserved  Portions Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH PUTP 3XCURSES "Jun 5, 2002"
.SH NAME
putp, tputs \- apply padding information and output string
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-I\fR /usr/xpg4/include \fB -L \fR /usr/xpg4/lib \e
\fB -R \fR /usr/xpg4/lib \fB -lcurses \fR [ \fIlibrary\fR... ]

\fBc89\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lcurses\fR [ \fIlibrary\fR... ]

#include <curses.h>

\fBint\fR \fBputp\fR(\fBconst char *\fR\fIstr\fR);
.fi

.LP
.nf
\fBint\fR \fBtputs\fR(\fBconst char *\fR\fIstr\fR, \fBint\fR \fIaffcnt\fR, \fBint (*\fR\fIputfunc\fR) (int));
.fi

.SH PARAMETERS
.sp
.ne 2
.na
\fB\fIstr\fR\fR
.ad
.RS 11n
Is a pointer to a \fBterminfo\fR variable or return value from
\fBtgetstr\fR(3XCURSES), \fBtgoto\fR(3XCURSES), \fBtigetstr\fR(3XCURSES), or
\fBtparm\fR(3XCURSES).
.RE

.sp
.ne 2
.na
\fB\fIaffcnt\fR\fR
.ad
.RS 11n
Is the number of lines affected, or 1 if not relevant.
.RE

.sp
.ne 2
.na
\fB\fIputfunc\fR\fR
.ad
.RS 11n
Is the output function.
.RE

.SH DESCRIPTION
.sp
.LP
The \fBputp()\fR and \fBtputs()\fR functions are low-level functions used  to
deal directly with the \fBterminfo\fR database.  The use of appropriate X/Open
Curses functions is recommended for most situations.
.sp
.LP
The \fBtputs()\fR function adds padding information and then outputs \fIstr\fR.
\fIstr\fR must be a \fBterminfo\fR string variable or the result value from
\fBtgetstr()\fR, \fBtgoto()\fR, \fBtigetstr()\fR, or \fBtparm()\fR.  The
\fBtputs()\fR function replaces the padding specification (if one exists) with
enough characters to produce the specified delay.  Characters are output one at
a time to \fIputfunc\fR, a user-specified function similar to
\fBputchar\fR(3C).
.sp
.LP
The \fBputp()\fR function calls \fBtputs()\fR as follows:
.sp
.LP
\fBtputs(\fR\fIstr\fR, 1, putchar)
.SH RETURN VALUES
.sp
.LP
On success, these functions return \fBOK\fR.
.SH ERRORS
.sp
.LP
None.
.SH USAGE
.sp
.LP
The output of \fBputp()\fR goes to \fBstdout\fR, not to the file descriptor,
\fIfildes\fR, specified in \fBsetupterm\fR(3XCURSES).
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Standard
_
MT-Level	Unsafe
.TE

.SH SEE ALSO
.sp
.LP
.BR putchar (3C),
.BR libcurses (3XCURSES),
.BR setupterm (3XCURSES),
.BR tgetent (3XCURSES),
.BR tigetflag (3XCURSES),
.BR terminfo (5),
.BR attributes (7),
.BR standards (7)
